package cn.hs.controller;

import cn.hs.entity.Consultlevel;
import cn.hs.service.ConsultlevelService;
import cn.hs.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName ConsultlevelController
 * @Description TODO
 * @Author yyk
 * @Date 2024年10月24日 15:32
 * @Version 1.0
 */

@RestController
@RequestMapping("/ConsultlevelController")
public class ConsultlevelController {
    @Autowired
    private ConsultlevelService consultlevelService;
    @RequestMapping("/findAll")
    public Result findAll(){
        List<Consultlevel> all = consultlevelService.findAll();
        if (all.size()>0){
            return Result.success(all);
        }else {
            return Result.error();
        }
    }
}
